﻿<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
 
    <script type='text/html' template> 
        <input type='hidden' name='PID' value="{{ d.params.PID || '' }}"/>
    </script>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>商品ID</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='GoodID' value='{{ d.params.GoodID || '' }}' lay-verify='required' placeholder='商品ID' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>团购价</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='GroupPrice' value='{{ d.params.GroupPrice || '' }}' lay-verify='required' placeholder='团购价' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>开始时间</label>
        <div class='layui-input-inline'>
            <script type='text/html' template lay-done='layui.data.datedone(d.params);'>
                <input type='text' readonly='readonly' name='StartTime' readonly='readonly' id='StartTime' value='{{ d.params.StartTime || '' }}' lay-verify='datetime' placeholder='yyyy-MM-dd HH:mm:ss' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>
       
    <div class='layui-form-item'>
        <label class='layui-form-label'>结束时间</label>
        <div class='layui-input-inline'>
            <script type='text/html' template lay-done='layui.data.datedone(d.params);'>
                <input type='text' readonly='readonly' name='EndTime' readonly='readonly' id='EndTime' value='{{ d.params.EndTime || '' }}' lay-verify='datetime' placeholder='yyyy-MM-dd HH:mm:ss' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>
       
    <div class='layui-form-item'>
        <label class='layui-form-label'>成团人数</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='GroupNum' value='{{ d.params.GroupNum || '' }}' lay-verify='required|number' placeholder='成团人数' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>参团有效期 (小时)</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='VailHour' value='{{ d.params.VailHour || '' }}' lay-verify='required|number' placeholder='参团有效期 (小时)' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>     
    <div class='layui-form-item'>
        <label class='layui-form-label'>是否显示 </label>
        <div class='layui-input-block'>
            <div class='layui-input-inline'>
                <script type='text/html' template>
                    <select readonly='readonly' name='IsAble_Sel'>                      <option value='0' {{ d.params.IsAble_Sel == '0' ? 'selected' : '' }}>显示</option>                      <option value='1' {{ d.params.IsAble_Sel == '1' ? 'selected' : '' }}>不显示</option>
                    </select>
                </script> 
            </div>
        </div>
    </div>
       
    <div class='layui-form-item'>
        <label class='layui-form-label'>备注</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='RMK' value='{{ d.params.RMK || '' }}' lay-verify='required' placeholder='备注' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>排序</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='Sort' value='{{ d.params.Sort || '' }}' lay-verify='required|number' placeholder='排序' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div> 
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button"  onclick="Close()" value="关闭" class="layui-btn">
        </div>
    </div>
</div>

<script type="text/javascript">  
    function Close(){
        layer.closeAll();
    }

    layui.use(['form','admin','upload','laydate'], function () {
        var form = layui.form;//required（必填项）phone（手机号）email（邮箱）url（网址）number（数字）date（日期）identity（身份证） 自定义值
    });
    
    
    layui.data.getSelSource = function (d,sourceName) { 
            var $ = layui.$;
            var form = layui.form;
            var admin = layui.admin;
 
    }
 
    
    layui.data.setUpload = function (d) { 
            var $ = layui.$,
            upload = layui.upload,
            admin = layui.admin;
            var formSelects = layui.formSelects;
 
    }

    
    layui.data.datedone = function (d) { 
            var laydate = layui.laydate;

            //日期时间选择器
            laydate.render({
                elem: '#StartTime'
              , type: 'datetime'
              , calendar: true
            });
            laydate.val = d.StartTime;

            //日期时间选择器
            laydate.render({
                elem: '#EndTime'
              , type: 'datetime'
              , calendar: true
            });
            laydate.val = d.EndTime;
 
    }
    
</script>
